package com.jf.cloud.distribution.constant;

public enum IncomeStateEnum {
    /**
     * 已失效
     */
    INVALID(-1, "已失效"),
    /**
     * 未支付
     */
    UN_PAY(0, "未支付"),
    /**
     * 未结算
     */
    UN_SETTLED(1, "未结算"),
    /**
     * 已结算
     */
    SETTLED(2, "已结算");


    private int value;
    private String desc;

    public Integer value() {
        return value;
    }
    public String desc() {
        return desc;
    }

    IncomeStateEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }
    public static IncomeStateEnum instance(Integer value) {
        IncomeStateEnum[] enums = values();
        for (IncomeStateEnum typeEnum : enums) {
            if (typeEnum.value().equals(value)) {
                return typeEnum;
            }
        }
        return null;
    }
}
